import WQRequest from "@/service";

//获取角色
export function getRole(data) {
    return WQRequest.post({
        url: "/role/getAllList",
        data
    });
}
//添加角色
export function addRoles(data) {
    return WQRequest.post({
        url: "/role/add",
        data
    });
}
//设置角色
export function setRoles(data) {
    return WQRequest.post({
        url: "/role/update",
        data
    });
}
// 删除角色
export function deleteRole(params) {
    return WQRequest.get({
        url: `/role/delete/${params.roleId}`
    });
}
// 修改菜单
export function setMenus(data) {
    return WQRequest.post({
        url: "/rolePower/bind",
        data
    });
}
// 获取菜单
export function getMenus(params) {
    return WQRequest.get({
        url: `/rolePower/getPowers/${params}`
    });
}
